<div id="content" style="background-color:#ffffff">
<div id="content-header">
  <div id="breadcrumb"> <a href="?m=admin&t=main" title="Go to Home" class="tip-bottom"><i class="icon-home"></i> 系统首页</a> <a href="#" class="current">应用列表</a> </div>
</div>
<div class="container-fluid" >
  
  <div class="row-fluid" >
  
 <blockquote class="layui-elem-quote layui-quote-nm">
 <a href="?m=admin&o=ticket&t=channel_app_add&channel_id=<{$id}>" class="layui-btn">新增应用</a>
</blockquote> 
<fieldset class="layui-elem-field layui-field-title">
  <legend>应用列表</legend>
</fieldset>
<div class="table_bd">	  
    <table class="layui-table">
	 
	  <thead>
	    <tr>
	      <th>名称</th>
	      <th>微信号</th>
		  <th>KEY</th>
		  <th>渠道名称</th>
		  <th>创建时间</th>
		  <th width="20%">操作</th>
	    </tr> 
	  </thead>
	  <tbody>
		<{section name=list loop=$applist}>
			<tr>
			  <td><{$applist[list].name}></td>
			  <td><{$applist[list].weixin_name}></td>
			  <td><{$applist[list].app_key}></td>
			  <td><{$applist[list].channel_name}></td>
			  <td><{$applist[list].c_time|date_format:'%Y-%m-%d %H:%M:%S'}></td>
			  <td>              
              <a href="?m=admin&o=ticket&t=channel_app_edit&id=<{$applist[list].id}>" class="layui-btn layui-btn-small">编辑</a>
			  <!--<button shop_id='<{$applist[list].id}>' class="create-ticket layui-btn layui-btn-small layui-btn-warm">绑定商户</button>-->
			  <a href="?m=admin&o=ticket&t=binding_business&id=<{$applist[list].id}>" class="layui-btn layui-btn-small layui-btn-warm">绑定商户</a>
              <a href="?m=admin&o=ticket&t=channel_app_del&id=<{$applist[list].id}>&channel_id=<{$applist[list].channel_id}>" class="layui-btn layui-btn-danger layui-btn-small">删除</a>
              
              </td>
			</tr>
		<{/section}>
	  </tbody>
	</table>
</div>
<div align='center'><{$page_menu}></div>
      
  </div>
</div>
<script>
layui.use(['layer'], function(){
 	var layer = layui.layer
 	$(".create-ticket").click(function(){
		var shop_id = $(this).attr('shop_id');
		/*layer.prompt({title: '请输入开票金额，并确认', formType: 0}, function(data, index){
			 $.ajax({
			   type: "POST",
			   url: "index.php?m=admin&o=ticket&t=ajaxCreateTicket",
			   data: "price="+data+"&shop_id="+shop_id,
			   success: function(msg){
				 if(msg==0){
					layer.close(index);
					layer.alert('创建失败！');	 
				 }else{
					layer.close(index);
					layer.open({
						title:'二维码',
						content:"<img src='http://qr.liantu.com/api.php?text="+msg+"'>"	
					}) 
				 }
			   }
			});
		});*/
		layer.open({
		  type: 2,
		  title: 'layer mobile页',
		  shadeClose: true,
		  shade: 0.8,
		  area: ['560px', '90%'],
		  content: '?m=admin&o=ticket&t=binding_business' //iframe的url
		});
	})
  
  
});
</script>